package com.neo.base.traitTest.traitBase

/**
  * Created by hadoop on 6/15/17.
  */


//select instence as Trait

object TraitAsCatFriend {

  def useFriend(friend: Friend) = friend listen()

  def main(args: Array[String]): Unit = {
    val snowy = new Cat("snowy") with Friend
    val friend : Friend = snowy
    friend.listen()

    useFriend(snowy)

  }

}
